Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs about script parameter #27010

Merged
merged 4 commits into from
Oct 16, 2017
Merged

Update docs about script parameter #27010

merged 4 commits into from
Oct 16, 2017

Conversation

pozhidaevak
Copy link
Contributor

The next changes were made:

  1. The description of short script form was added.
  2. The mention of obsolete config parameter script.default_lang config parameter was removed.
  3. The link to "How to use scripts" was added to "Update by queue" docs.

@nik9000, Please have a look on these changes.
I've tested them with gradle and build them too. Everything seems ok...

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one suggestion.

----------------------
"script": {
"source": "ctx._source.likes++"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the closing curly should align with "script" above.

@@ -98,8 +98,9 @@ parameter in the same way as the search api.
So far we've only been updating documents without changing their source. That
is genuinely useful for things like
<<picking-up-a-new-property,picking up new properties>> but it's only half the
fun. `_update_by_query` supports a `script` object to update the document. This
will increment the `likes` field on all of kimchy's tweets:
fun. `_update_by_query` supports a `script` object to update the document.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would flow better to make the link inline. Something like:

`_update_by_query` also <<modules-scripting-using, supports scripts>>. The following will....

1. Wrong indentation of a bracket;
2. Making a link to `How to use scripts` inline.
@pozhidaevak
Copy link
Contributor Author

@rjernst,
Thank you for comments. I've added a commit that includes suggested changes.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@rjernst rjernst merged commit 70668dd into elastic:master Oct 16, 2017
rjernst pushed a commit that referenced this pull request Oct 16, 2017
Added a description of short script form. Also removed references to the obsolete `script.default_lang`.
rjernst pushed a commit that referenced this pull request Oct 16, 2017
Added a description of short script form. Also removed references to the obsolete `script.default_lang`.
jasontedor added a commit that referenced this pull request Oct 16, 2017
* master:
  Remove unnecessary exception for engine constructor
  Update docs about `script` parameter (#27010)
  Don't refresh on `_flush` `_force_merge` and `_upgrade` (#27000)
  Do not set SO_LINGER on server channels (#26997)
  Fix inconsistencies in the rest api specs for *_script (#26971)
  fix inconsistencies in the rest api specs for cat.snapshots (#26996)
  Add docs on full_id parameter in cat nodes API
  [TEST] Add test that replicates versioned updates with random flushes
  Use internal searcher for all indexing related operations in the engine
  Reformat paragraph in template docs to 80 columns
  Clarify settings and template on create index
  Fix reference to TcpTransport in documentation
  Allow Uid#decodeId to decode from a byte array slice (#26987)
  Fix a typo in the similarity docs (#26970)
  Use separate searchers for "search visibility" vs "move indexing buffer to disk (#26972)
jasontedor added a commit that referenced this pull request Oct 16, 2017
* 6.x:
  Remove unnecessary exception for engine constructor
  Update docs about `script` parameter (#27010)
  Do not set SO_LINGER on server channels (#26997)
  Fix inconsistencies in the rest api specs for *_script (#26971)
  fix inconsistencies in the rest api specs for cat.snapshots (#26996)
  Add docs on full_id parameter in cat nodes API
  Add removal of types to the 6.0 breaking changes
  Create weights lazily in filter and filters aggregation (#26983)
  [TEST] Add test that replicates versioned updates with random flushes
  Use internal searcher for all indexing related operations in the engine
  Use separate searchers for "search visibility" vs "move indexing buffer to disk (#26972)
  Reformat paragraph in template docs to 80 columns
  Clarify settings and template on create index
  Fix reference to TcpTransport in documentation
  Allow Uid#decodeId to decode from a byte array slice (#26987)
  Fix a typo in the similarity docs (#26970)
@nik9000 nik9000 removed the v6.0.0 label Oct 16, 2017
@nik9000
Copy link
Member

nik9000 commented Oct 16, 2017

I've dropped the 6.0 tag from this because the support for the short form (#26841) is not in 6.1.

nik9000 added a commit that referenced this pull request Oct 16, 2017
This reverts commit bf5c6bd.

The change that it documented is not in 6.0.
@nik9000
Copy link
Member

nik9000 commented Oct 16, 2017

And reverted the change in 6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants